GXFindFormatProfile
QuickDraw GX sends theGXFindFormatProfile
message to allow you to modify color matching information for a specific format object. This message is similar to theGXFindPrinterProfile
message (described above), except that it finds a color profile that is associated with a format object rather than a printer object. Your override of theGXFindFormatProfile
message must match the following formal declaration:
OSErr MyFindFormatProfile (gxFormat theFormat, void *searchData, long index, gxColorProfile *returnedProfile, long *numProfiles);
theFormat
- The format object.
searchData
- A pointer to a block of data that is assumed to be a ColorSync searching block of type
CMProfileSearchRecord
. If this value is notnil
, then the value of theindex
parameter must not be 0 if you want the search to take place.- If this value is
nil
, the value of theindex
parameter defines which profile is returned.index
- The index of the profile to return. If the value is 0, then the current profile is returned in the
returnedProfile
parameter.- If the value of this parameter is not 0, then the behavior this function depends on the value of the
searchData
parameter. Ifindex
is not 0 andsearchData
isnil
, the indexed profile is returned in thereturnedProfile
parameter. Ifindex
is not 0 andsearchData
is notnil
, then the printer profiles are searched.returnedProfile
- On return, a color profile matching the criteria specified by the
searchData
andindex
parameters. If no color profiles are found, this value isnil
upon return.numProfiles
- On return, the number of profiles that were found.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
When an application calls theGXFindFormatProfile
function to search for a color profile that matches certain specficiations, QuickDraw GX sends theGXFindFormatProfile
message to allow your printing extension or printer driver to modify the search criteria or results.The default implementation of the
GXFindFormatProfile
message checks the profile that is associated with the specified format object. If no profile match is made, it then checks the profile that is associated with the color profile ('prof'
) resource that is stored with the desktop printer. If no profile is match, it then checks the profile that is associated with the color profile resource that is stored with the printer driver. If no match is made, thennil
is returned in thereturnedProfile
parameter. You can override this message to change the profile matching data prior to forwarding the message or to modify the match results after forwarding the message.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
TheGXFindFormatProfile
function is described in Inside Macintosh: QuickDraw GX Printing.Color matching, color profiles, the
CMProfileSearchRecord
structure, and color profile resources are described in Inside Macintosh: Advanced Color Imaging.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help